﻿import kliment.display.MCC;
import kliment.display.Sprite;

/**
 * ...
 * @author	Kliment
 * @version	1.0.1
 */
class kliment.ApplicationAbstract extends Sprite {
	private static var _instance:ApplicationAbstract;
	public static function get instance():ApplicationAbstract { 
		if (!_instance)
			_instance = new ApplicationAbstract(_root);
		return _instance 
	}
	
	private var _layout_cursor_mc:MovieClip;
	private var _layout_popup_mc:MovieClip;
	private var _layout_top_mc:MovieClip;
	
	public function ApplicationAbstract(target_mc:MovieClip) {
		super(target_mc);
		_instance = this;
		
		var parent_mc:MovieClip = (_target_mc._parent)? _target_mc._parent: _target_mc;
		_layout_top_mc = _target_mc.layout_top_mc || MCC.create(_target_mc);
		_layout_popup_mc = MCC.create(parent_mc);
		_layout_cursor_mc = MCC.create(parent_mc);
	}
	
	public function get layout_cursor_mc():MovieClip { return _layout_cursor_mc }
	public function get layout_popup_mc():MovieClip { return _layout_popup_mc }
	public function get layout_top_mc():MovieClip { return _layout_top_mc }
}